package src.main.java.org.oop.enumDemo;

public class Test {
    public static void main(String[] args) {
        A x = A.X;
        System.out.println(x);


//        枚举类构造方法私有，不能对外创建对象
//        A a = new A();

        A[] values = A.values();

        A z = A.valueOf("Z");
        System.out.println(z.name());
        System.out.println(z.ordinal());//索引




    }
}
